package com.digitalchina.lxnsy.activity.farmVideo;

import android.webkit.JavascriptInterface;

import com.digitalchina.lxnsy.base.BaseHtmlActivity;
import com.digitalchina.lxnsy.constant.URL;
import com.digitalchina.lxnsy.toolkit.JointImageUrl;
import com.digitalchina.lxnsy.toolkit.StringUtil;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * ================================================
 * 项目名称：android
 * 类描述：农业视频列表二级
 * 创建人：yzm
 * 创建时间：2020/1/8 17:26
 * 修改备注：
 * ================================================
 */
public class VideoList2Activity extends BaseHtmlActivity {

    private String json = "";

    @Override
    protected void loadHtml() {
        json = (String) getIntent().getSerializableExtra("msg");
        webView.addJavascriptObject(new JsApi(), null);
        loadUrl("video-video-list2");
        setTitle(json);
    }

    @Override
    public void rightOnClick() {

    }

    public class JsApi {
        //农技视频详情
        @JavascriptInterface
        public void goAgriTechVideoDetail(Object msg) {
            go(VideoDetailActivity.class);
        }

        //去评论
        @JavascriptInterface
        public void goEvalOper(Object msg) {
            go(CommentActivity.class);
        }

        //去个人主页
        @JavascriptInterface
        public void toPersonHomePage(Object msg) {
            go(PersonActivity.class);
        }

        //分享
        @JavascriptInterface
        public void share(Object msg) {

        }

        //小视频详情
        @JavascriptInterface
        public void smallVideo(Object msg) {
            go(SmallVideoActivity.class,"msg",msg.toString());
        }
    }
}
